Conversation
passlib with pwdlib
YuriiMotov
left a comment
There was a problem hiding this comment.
@4sushi, thanks for your interest!
Since we change the hashing algorithm, this changes will be breaking for existing projects.
I think we should keep supporting Bcrypt for existing password hashes, but use Argon2 for new as it's explained in docs: https://frankie567.github.io/pwdlib/guide/#password-hashing
|
It should be very straightforward to keep You just need to update pyproject.toml: "pwdlib[argon2,bcrypt]>=0.2.1",And in from pwdlib import PasswordHash
from pwdlib.hashers.argon2 import Argon2Hasher
from pwdlib.hashers.bcrypt import BcryptHasher
password_hash = PasswordHash(
(
Argon2Hasher(),
BcryptHasher(),
)
)All tests will pass:
|
|
Sorry I was pretty busy, thanks @ceb10n for completing the PR. |
|
This pull request has a merge conflict that needs to be resolved. |
|
Thanks! This was handled here: #2104 I'll close this one now. ☕ |

Replace hash library passlib by pwdlib, since passlib is not stable.
Pwdlib is used by fastapi.
Related PR
#1539